home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6509 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  52 lines

  1. Path: news.acns.nwu.edu!129
  2. From: msypherd@merle.acns.nwu.edu (Matthew C. Sypherd)
  3. Newsgroups: comp.lang.c++
  4. Subject: Borland C++ floating point overflow - Help!
  5. Date: Fri, 09 Feb 96 02:29:38 GMT
  6. Organization: Northwestern University
  7. Message-ID: <4febl6$5ei@news.acns.nwu.edu>
  8. NNTP-Posting-Host: eme085043.res-hall.nwu.edu
  9. X-Newsreader: News Xpress 2.0 Beta #0
  10.  
  11. Thanks for helping - 
  12.  
  13.         I am runing Borland 4.51 / 4.52 on my P90/16MB  with a Gigabyte 
  14. motherboard and Award BIOS 4.50<something>.  I am having problems simply 
  15. entering a floating point number.  Every time I do, I get "Floating Point: 
  16. Overflow"
  17.  
  18. For example,
  19.  
  20. #include <iostream.h>
  21. main()
  22. {
  23.         float x;
  24.         cin >> x;
  25.         cout << "It doesn't make it this far when I run it";
  26.         reutrn 0;
  27. }
  28.  
  29.         The program compiles fine, but when I run it, I run into problems.  If 
  30. I enter a floating point number, I get the error and the program quits.  If I 
  31. enter an int into the float variable 'x', everything works fine.
  32.  
  33.         Also, if I put a floating point number into an int variable, instead 
  34. of discarding the decimal part, I get a a bizzarre looping of output statments 
  35. that lock up the program.
  36.  
  37.         Is this a problem with my Computer, or do I have some setting set 
  38. incorrectly?  Any help would be appreciated.
  39.  
  40.         I'd rather not pay the 900 number fees for Borland tech support.  I 
  41. think the should at least help me get the program running for the price I 
  42. paid.  Maybe I'm just an optimist.
  43.  
  44.         Thanks again,
  45.  
  46.         Matthew C. Sypherd
  47.         ------------------
  48.         msypherd@nwu.edu
  49.  
  50. p.s.  If you could, please post and e-mail any reply - in case I miss the 
  51. header.  
  52.